home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / interfaces / PInterface Translator / PInterfaces / ENET.p < prev    next >
Encoding:
Text File  |  1993-09-16  |  2.6 KB  |  90 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Thursday, October 4, 1990 at 8:00 AM
  3.     ENET.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.     Copyright Apple Computer, Inc. 1989-1990
  7.     All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT ENET;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingENET}
  21. {$SETC UsingENET := 1}
  22.  
  23. {$I+}
  24. {$SETC ENETIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingTypes}
  27. {$I $$Shell(PInterfaces)Types.p}
  28. {$ENDC}
  29. {$IFC UNDEFINED UsingOSUtils}
  30. {$I $$Shell(PInterfaces)OSUtils.p}
  31. {$ENDC}
  32. {$SETC UsingIncludes := ENETIncludes}
  33.  
  34. CONST
  35. ENetSetGeneral = 253;     {Set "general" mode}
  36. ENetGetInfo = 252;         {Get info}
  37. ENetRdCancel = 251;         {Cancel read}
  38. ENetRead = 250;             {Read}
  39. ENetWrite = 249;         {Write}
  40. ENetDetachPH = 248;         {Detach protocol handler}
  41. ENetAttachPH = 247;         {Attach protocol handler}
  42. ENetAddMulti = 246;         {Add a multicast address}
  43. ENetDelMulti = 245;         {Delete a multicast address}
  44.  
  45. eLenErr = -92;           {Length error ddpLenErr}
  46. eMultiErr = -91;         {Multicast address error ddpSktErr}
  47.  
  48. EAddrRType = 'eadr';     {Alternate address resource type}
  49.  
  50. TYPE
  51. EParamBlkPtr = ^EParamBlock;
  52. EParamBlock = PACKED RECORD
  53.     qLink: QElemPtr;                                    {next queue entry}
  54.     qType: INTEGER;                                     {queue type}
  55.     ioTrap: INTEGER;                                    {routine trap}
  56.     ioCmdAddr: Ptr;                                     {routine address}
  57.     ioCompletion: ProcPtr;                                {completion routine}
  58.     ioResult: OSErr;                                    {result code}
  59.     ioNamePtr: StringPtr;                                {->filename}
  60.     ioVRefNum: INTEGER;                                 {volume reference or drive number}
  61.     ioRefNum: INTEGER;                                    {driver reference number}
  62.     csCode: INTEGER;                                    {call command code AUTOMATICALLY set}
  63.     CASE INTEGER OF
  64.       ENetWrite,ENetAttachPH,ENetDetachPH,ENetRead,ENetRdCancel,ENetGetInfo,ENetSetGeneral:
  65.         (eProtType: INTEGER;                            {Ethernet protocol type}
  66.         ePointer: Ptr;
  67.         eBuffSize: INTEGER;                                {buffer size}
  68.         eDataSize: INTEGER);                             {number of bytes read}
  69.       ENetAddMulti,ENetDelMulti:
  70.         (eMultiAddr: ARRAY [0..5] of char);                {Multicast Address}
  71.     END;
  72.  
  73.  
  74. FUNCTION EWrite(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  75. FUNCTION EAttachPH(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  76. FUNCTION EDetachPH(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  77. FUNCTION ERead(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  78. FUNCTION ERdCancel(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  79. FUNCTION EGetInfo(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  80. FUNCTION ESetGeneral(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  81. FUNCTION EAddMulti(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  82. FUNCTION EDelMulti(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  83.  
  84. {$ENDC}    { UsingENET }
  85.  
  86. {$IFC NOT UsingIncludes}
  87.     END.
  88. {$ENDC}
  89.  
  90.